﻿<Window x:Class="Loopback.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Loopback Exemption Manager" Height="549.196" Width="612.53" Closing="Window_Closing" Icon="assets/Windows.png">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="40"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal"  HorizontalAlignment="Center">
            <Label VerticalContentAlignment="Center" Margin="10,0,0,0">Filter the Apps:</Label>
            <TextBox Name="txtFilter" Grid.Row="0" Width="185" HorizontalAlignment="Left" Height="30" KeyUp="txtFilter_KeyUp" Margin="0,5" VerticalContentAlignment="Center"></TextBox>
            <CheckBox Name="cbLoopback" Click="cbLoopback_Click" VerticalContentAlignment="Center" Margin="10,0">Enabled</CheckBox>
            <Button Name="btnSave" Grid.Row="0" Width="100" Height="30" Click="btnSave_Click" Margin="10,0" >Save</Button>
            <Button Name="btnRefresh" Grid.Row="0" Width="100" Height="30" Click="btnRefresh_Click" Margin="10,0" >Refresh</Button>

        </StackPanel>
        <DataGrid x:Name="dgLoopback" AutoGenerateColumns="False" Grid.Row="1">
            <DataGrid.Columns>
                <DataGridTemplateColumn Header="Exempt" Width="60" IsReadOnly="True">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox Name="dgcbLoop" IsChecked="{Binding LoopUtil, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Click="dgcbLoop_Click" HorizontalAlignment="Center"/>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
                <DataGridTextColumn Header="App Name" Binding="{Binding Path=displayName}" />
            </DataGrid.Columns>
        </DataGrid>
        <StatusBar x:Name="SBar" Grid.Column="0" Grid.Row="3" VerticalAlignment="Bottom" Background="LightBlue" DockPanel.Dock="Bottom" Height="30">
            <StatusBarItem>
                <TextBlock FontWeight="Bold"><Run Text="Status: "/></TextBlock>
            </StatusBarItem>
            <StatusBarItem Grid.Column="1">
                <TextBlock Name="txtStatus"></TextBlock>
            </StatusBarItem>
        </StatusBar>

    </Grid>
</Window>
